<template>
	<view class="columnbox wdh-100 content">
		<view class="rowbox  spb one-info">
			<view>加盟类型</view>
			<view v-if="joininfo.joinType==0">同盟</view>
			<view v-else-if="joininfo.joinType==1">加盟</view>
		</view>
		<view class="rowbox  spb one-info">
			<view>投资金额</view>
			<view v-if="joininfo.joinCash==0">10~20万</view>
			<view v-else-if="joininfo.joinCash==1">20~30万</view>
			<view v-else-if="joininfo.joinCash==2">30~50万</view>
		</view>
		<view class="rowbox  spb one-info">
			<view>洗车形式</view>
			<view v-if="joininfo.stationType==0">旗舰站</view>
			<view v-else-if="joininfo.stationType==1">标准站</view>
			<view v-else-if="joininfo.stationType==2">自助站</view>
			<view v-else-if="joininfo.stationType==3">自动站</view>
		</view>
		<view class="rowbox  spb one-info">
			<view>加盟城市</view>
			<view>{{joininfo.cityName}}</view>
		</view>
		<view class="rowbox  spb one-info">
			<view>联系人</view>
			<view>{{joininfo.contact}}</view>
		</view>
		<view class="rowbox  spb one-info line-box">
			<view>联系方式</view>
			<view>{{joininfo.phone}}</view>
		</view>
		<view class="rowbox  spb one-info">
			<view>加盟进度</view>
			<view v-if="joininfo.verifyType==0">提交审核</view>
			<view v-else-if="joininfo.verifyType==1">审核中</view>
			<view v-else-if="joininfo.verifyType==2">审核失败</view>
			<view v-else-if="joininfo.verifyType==3">审核成功</view>
		</view>
		<view class="rowbox  spb one-info">
			<view>提交时间</view>
			<view>{{joininfo.createTime}}</view>
		</view>
		<!-- 审核成功添加洗车站 -->
		<view v-if="joininfo.verifyType==3" class="small-btn one-btn" @click="addStation">前往添加洗车站</view>
		<!-- 审核失败 -->
		<view v-if="joininfo.verifyType==2" class="small-btn one-btn" @click="reApply">重新提交审核</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				joininfo: ''
			};
		},
		onLoad(options) {
			this.id = options.id
			this.getDetail()
		},
		methods: {
			reApply() {
				uni.navigateTo({
					url: '/packageA/jiangmeng/apply'
				})
			},
			getDetail() {
				this.$req.get(`/xcx/join/${this.id}`).then(res => {
					this.joininfo = res.data.data
				})
			},
			addStation() {
				uni.redirectTo({
					url: '/packageA/xichezhan/add'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		font-family: PingFang SC;
	}

	.one-info {
		width: 710rpx;
		padding: 32rpx 20rpx;

		font-size: 28rpx;
	}

	.line-box {
		border-bottom: #eef0f7 solid 1px;
	}

	.one-btn {
		width: 710rpx;
		height: 90rpx;
		margin-top: 40rpx;
		border-radius: 20rpx;
	}
</style>